package top.forforever.srb.mq.service.impl;

import com.sun.org.apache.bcel.internal.generic.NEW;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.forforever.srb.mq.pojo.dto.SmsDTO;
import top.forforever.srb.mq.service.MqService;

/**
 * @create: 2023/6/9
 * @Description:
 * @FileName: MqServiceImpl
 * @自定义内容：
 */
@Service
public class MqServiceImpl implements MqService {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    @Override
    public void sendSmsMessage(String exchange, String routingKey, SmsDTO message) {
        System.out.println("充值成功");
        rabbitTemplate.convertAndSend(exchange,routingKey,message);
    }
}
